<?php
/** 
 * @version 1.2
 * @since 2
 * 
 * 
 */
class Reale_Model_Estate_Spec
{
    /**
     * Propery/Project Unique ID
     * @var int
     */
    protected $_pid;
    
	/**
	 * Stores estate's type identification 
	 * @var string
	 */
	protected $_type_id;
	
	/**
	 * Stores estate's category identification
	 * @var string
	 */
	protected $_category_id;
	
	/**
	 * Stores estate's bhk (if applicable)
	 * @var int
	 */
	protected $_bhk;
	
	/**
	 * Stores estate's size
	 * @var double
	 */
	protected $_size;
	
	
	/**
	 * Stores estate's total Price
	 * @var double
	 */
	protected $_price;
	
	/**
	 * Stores estate's rate per unit size
	 * @var double
	 */
	protected $_rate_per_unit;
	
	
	/**
	 * Stores purpose for what estate is submitted
	 * @var string
	 */
	protected $_estate_for;
	
	
	/**
	 * Stores estate's current status
	 * @var string
	 */
	protected $_status;
	
	
	/**
	 * Stores estate's Remarks
	 * @var string
	 */
	protected $_remark;
	
	/**
	 * Stores estate's actual input unit
	 * @var string
	 */
	protected $_input_unit;
	

    /**
     * Constructor
     * 
     * @param  array|null $options 
     * @return void
     */
    public function __construct(array $options = null)
    {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
	
    /**
     * Overloading: allow property access
     * 
     * @param  string $name 
     * @param  mixed $value 
     * @return void
     */
    public function __set($name, $value)
    {
        $method = 'set' . $name;
        if ('mapper' == $name || !method_exists($this, $method)) {
            throw new Exception('Invalid property specified',Zend_Log::DEBUG);
        }
        $this->$method($value);
    }

    /**
     * Overloading: allow property access
     * 
     * @param  string $name 
     * @return mixed
     */
    public function __get($name)
    {
        $method = 'get' . $name;
        if ('mapper' == $name || !method_exists($this, $method)) {
             throw new Exception('Invalid property specified',Zend_Log::DEBUG);
        }
        return $this->$method();
    }
    
    /**
     * Set object state
     * 
     * @param  array $options 
     * @return Reale_Model_Estate_Spec
     */
    public function setOptions(array $options)
    {
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }

    /**
     * Set object to array
     * 
     * @return array
     */
    public function __toArray()
    {
        $data = array();
        $methods = get_class_methods($this);
        foreach ($methods as $key => $method) {
            if ('get' == substr($method, 0,3)) {
                $output = $this->$method();
                if (is_array($output) or is_string($output)) {
                    $newKey = strtolower(substr($method, 3));
                    $data[$newKey] = $output;
                }
            };
        }
        return $data;
    }
    
	/**
     * @return the $_pid
     */
    public function getPid ()
    {
        return $this->_pid;
    }

	/**
     * @param int $_pid
     * @return Reale_Model_Estate_Spec
     */
    public function setPid ($_pid)
    {
        $this->_pid = $_pid;
        return $this;
    }

	/**
     * @return the $_type_id
     */
    public function getType_id ()
    {
        return $this->_type_id;
    }

	/**
     * @param string $_type_id
     * @return Reale_Model_Estate_Spec
     */
    public function setType_id ($_type_id)
    {
        $this->_type_id = $_type_id;
        return $this;
    }

	/**
     * @return the $_category_id
     */
    public function getCategory_id ()
    {
        return $this->_category_id;
    }

	/**
     * @param string $_category_id
     * @return Reale_Model_Estate_Spec
     */
    public function setCategory_id ($_category_id)
    {
        $this->_category_id = $_category_id;
        return $this;
    }

	/**
     * @return the $_bhk
     */
    public function getBhk ()
    {
        return $this->_bhk;
    }

	/**
     * @param int $_bhk
     * @return Reale_Model_Estate_Spec
     */
    public function setBhk ($_bhk)
    {
        $this->_bhk = $_bhk;
        return $this;
    }

	/**
     * @return the $_size
     */
    public function getSize ()
    {
        return $this->_size;
    }

	/**
     * @param double $_size
     * @return Reale_Model_Estate_Spec
     */
    public function setSize ($_size)
    {
        $this->_size = $_size;
        return $this;
    }

	/**
     * @return the $_price
     */
    public function getPrice ()
    {
        return (string)$this->_price;
    }

	/**
     * @param double $_price
     * @return Reale_Model_Estate_Spec
     */
    public function setPrice ($_price)
    {
        $this->_price = $_price;
        return $this;
    }

	/**
     * @return the $_rate_per_unit
     */
    public function getRate_per_unit ()
    {
        return (string)$this->_rate_per_unit;
    }

	/**
     * @param double $_rate_per_unit
     * @return Reale_Model_Estate_Spec
     */
    public function setRate_per_unit ($_rate_per_unit)
    {
        $this->_rate_per_unit = $_rate_per_unit;
        return $this;
    }

	/**
     * @return the $_estate_for
     */
    public function getEstate_for ()
    {
        return $this->_estate_for;
    }

	/**
     * @param string $_estate_for
     * @return Reale_Model_Estate_Spec
     */
    public function setEstate_for ($_estate_for)
    {
        $this->_estate_for = $_estate_for;
        return $this;
    }

	/**
     * @return the $_status
     */
    public function getStatus ()
    {
        return $this->_status;
    }

	/**
     * @param string $_status
     * @return Reale_Model_Estate_Spec
     */
    public function setStatus ($_status)
    {
        $this->_status = $_status;
        return $this;
    }

	/**
     * @return the $_remark
     */
    public function getRemark ()
    {
        return $this->_remark;
    }

	/**
     * @param string $_remark
     * @return Reale_Model_Estate_Spec
     */
    public function setRemark ($_remark)
    {
        $this->_remark = $_remark;
        return $this;
    }
	/**
     * @return the $_input_unit
     */
    public function getInput_unit ()
    {
        return $this->_input_unit;
    }

	/**
     * @param string $_input_unit
     */
    public function setInput_unit ($_input_unit)
    {
        $this->_input_unit = $_input_unit;
    }


	
	
}
?>